extends ../layout

block title
    title 博客发布
block link
    link(rel='stylesheet', href='/plugin/editormd/css/editormd.min.css')

block content
    div(class="container-fluid show")
        div(class="row")
            div(class="col-lg-12 col-md-12 col-sm-12")
                form(class="form-horizontal" role="form" action="/admin/posts/update" method="post")
                    input(type="hidden" name="id" value="#{blogPost.id}")
                    input(type="hidden" name="contentHtml" class="content-html")
                    div(class="form-group")
                        label(for="inputEmail3" class="col-lg-1 col-md-1 col-sm-1 control-label") 标题
                        div(class="col-lg-11 col-md-11 col-sm-11")
                            input(type="text" name="title" class="form-control" id="inputEmail3" placeholder="请输入标题" value="#{blogPost.title}")
                    div(class="form-group")
                        label(class="col-lg-1 col-md-1 col-sm-1 control-label") 内容
                        div(class="col-lg-11 col-md-11 col-sm-11")
                            div(id="editormd" class="editormd")
                                textarea(class="form-control content" name="contentMarkdown" rows="3" placeholder="请输入内容") #{blogPost.content_markdown}
                    div(class="form-group")
                        div(class="col-lg-offset-1 col-md-offset-1 col-sm-offset-1 col-lg-11 col-md-11 col-sm-11")
                            button(type="button" class="btn btn-primary save") 提交


block script
    script(src="/plugin/editormd/editormd.min.js")
    script(src="/javascripts/add.js")


